<template>
    <div>
        <el-table :data="list" style="width: 100%" border>
            <el-table-column prop="id" label="编号" />
            <el-table-column prop="name" label="类型名称" />
            <el-table-column prop="attributeCount" label="属性数量" />
            <el-table-column prop="paramCount" label="参数数量" />
            <el-table-column prop="email" label="设置">
                <!-- <template #default="{ row }">
                    <div class="buttonBox">
                        <el-button @click="attributeJump(row.id, row.name, row.attributeCount)"
                            :disabled="params.parentId !== 0">属性列表</el-button>
                        <el-button @click="attributeJump(row.id, row.name, row.paramCount)"
                            :disabled="params.parentId !== 0">参数列表</el-button> 
                    </div>
                </template> -->
            </el-table-column>
            <el-table-column prop="email" label="操作">
                <!-- <template #default="{ row }">
                    <el-button @click="updateList(row.id)">编辑</el-button>
                    <el-button type="danger" @click="deleteList(row.id)">删除</el-button>
                </template> -->
            </el-table-column>
        </el-table>
    </div>
    <div>
        <div class="page">
            <!-- <ElConfigProvider :locale="zhCn">
                <el-pagination v-model:current-page="params.pageNum" v-model:page-size="params.pageSize"
                    :page-sizes="[10, 20, 50, 100]" background layout="total, sizes, prev, pager, next, jumper"
                    :total="total" @size-change="productList" @current-change="productList" />
            </ElConfigProvider> -->
        </div>
    </div>
</template>
<script setup lang="ts">
import { ElTable, ElTableColumn, ElButton, ElConfigProvider, ElPagination } from 'element-plus';
import { zhCn } from 'element-plus/es/locale';
import { attributeJumpAPI } from './api';
import {  reactive, ref } from 'vue';

const Params=defineProps({
    fatherParams:{
        type:Object
    }
})

const paramsList = reactive({
    cid:29,
    pageNum:1,
    pageSize:5,
    type:1,
    cname:"dddddddd111"
})

const total = ref(0)

const list = ref<IAttributeJump[]>([])

const params = reactive({
    pageNum: 1,
    pageSize: 5,
})

const attribute = () => {
    attributeJumpAPI(paramsList.cid, paramsList.pageNum, paramsList.pageSize, paramsList.type, paramsList.cname).then((res)=>{
        if(res.code===200){
            console.log(res.data);
            
        }
    })
}
console.log(Params.fatherParams);

attribute()

</script>
<style lang="less" scoped>
</style>